<!DOCTYPE html>
<html lang="en">
<head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Document</title>
</head>
<body>
     
     
<script>
     function Pig(name,age,gender) {
     this.name = name;
     this.age = age;
     this.gender = gender;
}
const p1 =new Pig('佩奇',2,'母');//构造函数的实例化
const p2 =new Pig('乔治',1,'公');
console.log(p1);
</script>
</body>
</html>